package com.ruoyi.finance.service.impl;

import com.ruoyi.finance.domain.FmsCustomer;
import com.ruoyi.finance.mapper.FmsCustomerMapper;
import com.ruoyi.finance.service.IFmsCustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 客户 服务层实现
 *
 * @author 夜雨
 */
@Service
public class FmsCustomerServiceImpl implements IFmsCustomerService {
    @Autowired
    private FmsCustomerMapper customerMapper;

    /**
     * 查询客户
     *
     * @param customerId 客户ID
     * @return 客户
     */
    @Override
    public FmsCustomer selectCustomerById(Long customerId) {
        return customerMapper.selectCustomerById(customerId);
    }

    /**
     * 查询客户列表
     *
     * @param customer 客户
     * @return 公告集合
     */
    @Override
    public List<FmsCustomer> selectCustomerList(FmsCustomer customer) {
        return customerMapper.selectCustomerList(customer);
    }

    /**
     * 新增客户
     *
     * @param customer 客户
     * @return 结果
     */
    @Override
    public int insertCustomer(FmsCustomer customer) {
        return customerMapper.insertCustomer(customer);
    }

    /**
     * 修改客户
     *
     * @param customer 客户
     * @return 结果
     */
    @Override
    public int updateCustomer(FmsCustomer customer) {
        return customerMapper.updateCustomer(customer
        );
    }

    /**
     * 删除客户
     *
     * @param customerId 客户ID
     * @return 结果
     */
    @Override
    public int deleteCustomerById(Long customerId) {
        return customerMapper.deleteCustomerById(customerId);
    }

    /**
     * 批量删除客户
     *
     * @param customerIds 需要删除的客户ID
     * @return 结果
     */
    @Override
    public int deleteCustomerByIds(Long[] customerIds) {
        return customerMapper.deleteCustomerByIds(customerIds);
    }
}
